import Vue from 'vue'
import VueI18n from 'vue-i18n'

Vue.use(VueI18n)

let _lang = localStorage.getItem('lang');
console.log(navigator.language);
console.log(navigator);

switch (navigator.language) {
  case 'zh-CN':
    _lang = '';
    break;
  case 'zh-TW':
    _lang = '';
    break;
}

const i18n = new VueI18n({
  locale: _lang,
  messages: {
    'zh': require('../assets/lang/zh'),
    'en': require('../assets/lang/en')
  }
})


export default i18n